import { IToolTipItem } from "../../../../../com/mui/manager/IToolTipItem";
import { TCopyMarkTaskReward } from "../../../../../Message/Db/Tables/TCopyMarkTaskReward";
import { ToolTipsManager } from "../../../../../com/mui/manager/ToolTipsManager";
import { GlobalClass } from "../../../../../com/mui/core/GlobalClass";
import { ImagesConst } from "../../../resource/ImagesConst";
import { ObjCreate } from "../../common/ObjCreate";
import { LoaderManager } from "../../../../../com/gengine/resource/LoaderManager";
import { ImageInfo } from "../../../../../com/gengine/resource/info/ImageInfo";
import { Language } from "../../../../../extend/language/Language";
import { ItemsUtil } from "../../shortcuts/item/ItemsUtil";
import { ItemData } from "../../../resource/info/ItemData";
import { ToolTipInfo } from "../../../model/ToolTipInfo";
import { Tooltip } from "../../common/tooltip/Tooltip";
import { GLabel } from "../../../../../com/mui/controls/GLabel";
type int = number;
//class CopyGradeAwardBox
    
    export  class CopyGradeAwardBox /* flash.display.Sprite */ implements IToolTipItem
    {
        constructor(arg1: TCopyMarkTaskReward)
        {
            
            this._info = arg1;
            this.createChildren();
            ToolTipsManager.register(this);
            return;
        }

        protected createChildren(): void
        {
            var loc1=GlobalClass.getBitmap(ImagesConst.PackItemBg);
            loc1.x = -3;
            loc1.y = -3;
            this.addChildAt(loc1, 0);
            this._label = ObjCreate.createLabel(this._info.taskNum + "个", 0, 16, 35, 20, flash.text.TextFormatAlign.RIGHT, this, true, 16777215);
            LoaderManager.instance.load("CopyGradeBox_" + this._info.id + ".png", this.onBoxLoaded);
            return;
        }

        /* internal  */onBoxLoaded(arg1: ImageInfo): void
        {
            var loc1=new Object /* flash.display.Bitmap */(arg1.bitmapData);
            loc1.width = 32;
            loc1.height = 32;
            this.addChildAt(loc1, 1);
            return;
        }

        public get taskNum(): int
        {
            return this._info.taskNum;
        }

        public get taskId(): int
        {
            return this._info.id;
        }

        public get rewardItemCode(): int
        {
            return this._info.rewardItem;
        }

        public get toolTipData()
        {
            var loc1="";
            loc1 = Language.getStringByParam(90096, this._info.rewardNum.toString(), ItemsUtil.getItemName(new ItemData(this._info.rewardItem)));
            return new ToolTipInfo(Tooltip.ToolTipRenderType_ShortcutItem, loc1);
        }

        public set toolTipData(arg1)
        {
            return;
        }

        /* internal */ /* var */_info: TCopyMarkTaskReward;

        /* internal */ /* var */_label: GLabel;
    }
